package cn.xmirror.sca.common.constant;

/**
 * 漏洞利用难度枚举类
 *
 * @author Yuan Shengjun
 */
public enum ExploitLevelEnum {
    EASY(1, "容易"),
    DIFFICULT(0, "困难"),
    ;

    private final int level;
    private final String tag;

    ExploitLevelEnum(int level, String tag) {
        this.level = level;
        this.tag = tag;
    }

    public int getLevel() {
        return level;
    }

    public static String getTag(int level) {
        for (ExploitLevelEnum value : values()) {
            if (value.level == level) {
                return value.tag;
            }
        }
        return null;
    }
}
